package com.fin.zw.intelligentbot.entity;

import com.fin.zw.intelligentbot.enums.ResourceType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;


@Entity
@Table(appliesTo = "resource",comment="菜单信息表")
@Data
public class Resource extends BaseEntity{

    @Column(columnDefinition = "varchar(50) COMMENT '资源名称'")
    private String name;

    @Column(columnDefinition = "varchar(10) COMMENT '类型'")
    @Enumerated(EnumType.STRING)
    private ResourceType type;

    @Column(columnDefinition = "varchar(100) COMMENT '地址'")
    private String url;

    @Column(columnDefinition = "varchar(20) COMMENT '图标'")
    private String icon;

    @Column(columnDefinition = "varchar(64) COMMENT '父功能ID'")
    private String parentId;

    @Column(columnDefinition = "int(4) COMMENT '排序'")
    private Integer sort;

    @Column(columnDefinition = "varchar(200) COMMENT '备用字段'")
    private String remark;
}
